<!DOCTYPE html>
<!--解决idea thymeleaf 表达式模板报红波浪线-->
<!--suppress ALL -->
<html xmlns:th="http://www.thymeleaf.org">
    <head>
        <!-- 引入公用部分 -->
        <script th:replace="head::static"></script>
        <!-- 样式 -->
        <link th:href="@{/css/common.css}" rel="stylesheet" type="text/css"/>
    </head>
    <body>
        <div class="layui-row layui-col-space15">
            <!-- 树 -->
            <div class="layui-col-md4">
                <div class="layui-card">
                    <div class="layui-card-header">组织树</div>
                    <div class="layui-card-body">
                        <div id="deptTree" class="demo-tree demo-tree-box"
                             style="height: 450px; overflow: scroll;"></div>
                    </div>
                </div>
            </div>
            <!-- 操作表单 -->
            <div class="layui-col-md8">
                <div class="layui-card">
                    <div class="layui-card-header">操作表单</div>
                    <div class="layui-card-body">
                        <form id="deptForm" class="layui-form layui-form-pane">
                            <div class="layui-form-item">
                                <label class="layui-form-label">上级节点</label>
                                <div class="layui-input-block">
                                    <input type="text" name="parentName" autocomplete="off" placeholder="上级节点"
                                           class="layui-input" readonly="readonly" disabled="disabled">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">节点名称</label>
                                <div class="layui-input-block">
                                    <input type="text" name="deptName" autocomplete="off" placeholder="节点名称"
                                           class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">显示顺序</label>
                                <div class="layui-input-block">
                                    <input type="text" name="orderNum" autocomplete="off" placeholder="显示顺序"
                                           class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">组织状态</label>
                                <div class="layui-input-block">
                                    <input type="radio" name="status" value="0" title="显示">
                                    <input type="radio" name="status" value="1" title="隐藏">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">负责人</label>
                                <div class="layui-input-block">
                                    <input type="text" name="leader" autocomplete="off" placeholder="负责人"
                                           class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">联系电话</label>
                                <div class="layui-input-block">
                                    <input type="text" name="phonenumber" autocomplete="off" placeholder="联系电话"
                                           class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">邮箱</label>
                                <div class="layui-input-block">
                                    <input type="text" name="email" autocomplete="off" placeholder="邮箱"
                                           class="layui-input">
                                </div>
                            </div>
                            <!-- 隐藏域 -->
                            <input type="text" name="id" hidden="hidden"/>
                            <input type="text" name="parentId" hidden="hidden"/>
                            <!-- treeId，用于更新HTML-->
                            <input type="text" name="treeId" hidden="hidden"/>

                            <div class="layui-form-item">
                                <div class="layui-input-block">
                                    <a class="layui-btn" onclick="deptFormSave()">保存</a>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </body>
    <!-- js -->
    <script th:src="@{/js/sys/dept/dept.js}"></script>
</html>